package com.zb.vo;

import cn.hutool.core.bean.BeanUtil;
import com.zb.annotation.NumberPattern;
import com.zb.entity.FieldValOptionVo;
import com.zb.entity.ZjNetworkEmpFieldVal;
import com.zb.entity.ZjNetworkFieldVal;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * @Author WEN
 * @Date 2023/10/18 0018
 **/
@Data
@ApiModel("服务商字段值对象")
public class NetworkFieldValVo {

    @ApiModelProperty(value = "服务商字段值ID，新增不必传，修改必传")
    private Long id;

    @ApiModelProperty(value = "自定义字段表ID", required = true)
    private Long fieldId;

    @NumberPattern(regexp = VerificUtil.FIELD_TYPE, message = "字段类型参数不合法")
    @ApiModelProperty(value = "字段类型：1-文本，2-多行文本，3-单选，4-多选，5-多图，6-附件，7-视频，8-评分", required = true, example = "1")
    private Integer type;

    @Length(max = 10, message = "字段名称长度限制 10 个字符")
    @ApiModelProperty(value = "字段名称", required = true)
    private String name;

    @ApiModelProperty(value = "字段内容值对象")
    private List<FieldValOptionVo> optVos;

    public NetworkFieldValVo() {
    }

}
